3.2.57 \(\int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) [157]

3.2.57.1 Optimal result
3.2.57.2 Mathematica [A] (verified)
3.2.57.3 Rubi [A] (verified)
3.2.57.4 Maple [A] (verified)
3.2.57.5 Fricas [A] (verification not implemented)
3.2.57.6 Sympy [A] (verification not implemented)
3.2.57.7 Maxima [F(-2)]
3.2.57.8 Giac [A] (verification not implemented)
3.2.57.9 Mupad [B] (verification not implemented)

3.2.57.1 Optimal result

Integrand size = 24, antiderivative size = 224 \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {7 x}{64 a^4}+\frac {i a^2}{48 d (a+i a \tan (c+d x))^6}+\frac {3 i a}{80 d (a+i a \tan (c+d x))^5}+\frac {3 i}{64 d (a+i a \tan (c+d x))^4}+\frac {5 i}{96 a d (a+i a \tan (c+d x))^3}-\frac {i}{256 d \left (a^2-i a^2 \tan (c+d x)\right )^2}+\frac {15 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac {7 i}{256 d \left (a^4-i a^4 \tan (c+d x)\right )}+\frac {21 i}{256 d \left (a^4+i a^4 \tan (c+d x)\right )} \]

output
7/64*x/a^4+1/48*I*a^2/d/(a+I*a*tan(d*x+c))^6+3/80*I*a/d/(a+I*a*tan(d*x+c)) 
^5+3/64*I/d/(a+I*a*tan(d*x+c))^4+5/96*I/a/d/(a+I*a*tan(d*x+c))^3-1/256*I/d 
/(a^2-I*a^2*tan(d*x+c))^2+15/256*I/d/(a^2+I*a^2*tan(d*x+c))^2-7/256*I/d/(a 
^4-I*a^4*tan(d*x+c))+21/256*I/d/(a^4+I*a^4*tan(d*x+c))
 
3.2.57.2 Mathematica [A] (verified)

Time = 0.50 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.73 \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\sec ^8(c+d x) (525 i+1120 i \cos (2 (c+d x))+504 i \cos (4 (c+d x))-96 i \cos (6 (c+d x))-5 i \cos (8 (c+d x))-560 \sin (2 (c+d x))+840 \arctan (\tan (c+d x)) (\cos (4 (c+d x))+i \sin (4 (c+d x)))-294 \sin (4 (c+d x))+144 \sin (6 (c+d x))+10 \sin (8 (c+d x)))}{7680 a^4 d (-i+\tan (c+d x))^6 (i+\tan (c+d x))^2} \]

input
Integrate[Cos[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]
 
output
(Sec[c + d*x]^8*(525*I + (1120*I)*Cos[2*(c + d*x)] + (504*I)*Cos[4*(c + d* 
x)] - (96*I)*Cos[6*(c + d*x)] - (5*I)*Cos[8*(c + d*x)] - 560*Sin[2*(c + d* 
x)] + 840*ArcTan[Tan[c + d*x]]*(Cos[4*(c + d*x)] + I*Sin[4*(c + d*x)]) - 2 
94*Sin[4*(c + d*x)] + 144*Sin[6*(c + d*x)] + 10*Sin[8*(c + d*x)]))/(7680*a 
^4*d*(-I + Tan[c + d*x])^6*(I + Tan[c + d*x])^2)
 
3.2.57.3 Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 203, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3968, 54, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sec (c+d x)^4 (a+i a \tan (c+d x))^4}dx\)

\(\Big \downarrow \) 3968

\(\displaystyle -\frac {i a^5 \int \frac {1}{(a-i a \tan (c+d x))^3 (i \tan (c+d x) a+a)^7}d(i a \tan (c+d x))}{d}\)

\(\Big \downarrow \) 54

\(\displaystyle -\frac {i a^5 \int \left (\frac {7}{256 a^8 (a-i a \tan (c+d x))^2}+\frac {21}{256 a^8 (i \tan (c+d x) a+a)^2}+\frac {1}{128 a^7 (a-i a \tan (c+d x))^3}+\frac {15}{128 a^7 (i \tan (c+d x) a+a)^3}+\frac {5}{32 a^6 (i \tan (c+d x) a+a)^4}+\frac {3}{16 a^5 (i \tan (c+d x) a+a)^5}+\frac {3}{16 a^4 (i \tan (c+d x) a+a)^6}+\frac {1}{8 a^3 (i \tan (c+d x) a+a)^7}+\frac {7}{64 a^8 \left (\tan ^2(c+d x) a^2+a^2\right )}\right )d(i a \tan (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {i a^5 \left (\frac {7 i \arctan (\tan (c+d x))}{64 a^9}+\frac {7}{256 a^8 (a-i a \tan (c+d x))}-\frac {21}{256 a^8 (a+i a \tan (c+d x))}+\frac {1}{256 a^7 (a-i a \tan (c+d x))^2}-\frac {15}{256 a^7 (a+i a \tan (c+d x))^2}-\frac {5}{96 a^6 (a+i a \tan (c+d x))^3}-\frac {3}{64 a^5 (a+i a \tan (c+d x))^4}-\frac {3}{80 a^4 (a+i a \tan (c+d x))^5}-\frac {1}{48 a^3 (a+i a \tan (c+d x))^6}\right )}{d}\)

input
Int[Cos[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]
 
output
((-I)*a^5*((((7*I)/64)*ArcTan[Tan[c + d*x]])/a^9 + 1/(256*a^7*(a - I*a*Tan 
[c + d*x])^2) + 7/(256*a^8*(a - I*a*Tan[c + d*x])) - 1/(48*a^3*(a + I*a*Ta 
n[c + d*x])^6) - 3/(80*a^4*(a + I*a*Tan[c + d*x])^5) - 3/(64*a^5*(a + I*a* 
Tan[c + d*x])^4) - 5/(96*a^6*(a + I*a*Tan[c + d*x])^3) - 15/(256*a^7*(a + 
I*a*Tan[c + d*x])^2) - 21/(256*a^8*(a + I*a*Tan[c + d*x]))))/d
 

3.2.57.3.1 Defintions of rubi rules used

rule 54
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E 
xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && 
 ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3968
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ 
), x_Symbol] :> Simp[1/(a^(m - 2)*b*f)   Subst[Int[(a - x)^(m/2 - 1)*(a + x 
)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && 
 EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
 
3.2.57.4 Maple [A] (verified)

Time = 0.65 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.64

method result size
derivativedivides \(\frac {-\frac {7 i \ln \left (\tan \left (d x +c \right )-i\right )}{128}+\frac {3 i}{64 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {i}{48 \left (\tan \left (d x +c \right )-i\right )^{6}}-\frac {15 i}{256 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {3}{80 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {5}{96 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {21}{256 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{256 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {7 i \ln \left (\tan \left (d x +c \right )+i\right )}{128}+\frac {7}{256 \left (\tan \left (d x +c \right )+i\right )}}{d \,a^{4}}\) \(143\)
default \(\frac {-\frac {7 i \ln \left (\tan \left (d x +c \right )-i\right )}{128}+\frac {3 i}{64 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {i}{48 \left (\tan \left (d x +c \right )-i\right )^{6}}-\frac {15 i}{256 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {3}{80 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {5}{96 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {21}{256 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{256 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {7 i \ln \left (\tan \left (d x +c \right )+i\right )}{128}+\frac {7}{256 \left (\tan \left (d x +c \right )+i\right )}}{d \,a^{4}}\) \(143\)
risch \(\frac {7 x}{64 a^{4}}+\frac {7 i {\mathrm e}^{-6 i \left (d x +c \right )}}{192 a^{4} d}+\frac {7 i {\mathrm e}^{-8 i \left (d x +c \right )}}{512 a^{4} d}+\frac {i {\mathrm e}^{-10 i \left (d x +c \right )}}{320 a^{4} d}+\frac {i {\mathrm e}^{-12 i \left (d x +c \right )}}{3072 a^{4} d}+\frac {69 i \cos \left (4 d x +4 c \right )}{1024 a^{4} d}+\frac {71 \sin \left (4 d x +4 c \right )}{1024 a^{4} d}+\frac {3 i \cos \left (2 d x +2 c \right )}{32 a^{4} d}+\frac {\sin \left (2 d x +2 c \right )}{8 a^{4} d}\) \(150\)

input
int(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)
 
output
1/d/a^4*(-7/128*I*ln(tan(d*x+c)-I)+3/64*I/(tan(d*x+c)-I)^4-1/48*I/(tan(d*x 
+c)-I)^6-15/256*I/(tan(d*x+c)-I)^2+3/80/(tan(d*x+c)-I)^5-5/96/(tan(d*x+c)- 
I)^3+21/256/(tan(d*x+c)-I)+1/256*I/(tan(d*x+c)+I)^2+7/128*I*ln(tan(d*x+c)+ 
I)+7/256/(tan(d*x+c)+I))
 
3.2.57.5 Fricas [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.49 \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (1680 \, d x e^{\left (12 i \, d x + 12 i \, c\right )} - 15 i \, e^{\left (16 i \, d x + 16 i \, c\right )} - 240 i \, e^{\left (14 i \, d x + 14 i \, c\right )} + 1680 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 1050 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 560 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 210 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 48 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-12 i \, d x - 12 i \, c\right )}}{15360 \, a^{4} d} \]

input
integrate(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")
 
output
1/15360*(1680*d*x*e^(12*I*d*x + 12*I*c) - 15*I*e^(16*I*d*x + 16*I*c) - 240 
*I*e^(14*I*d*x + 14*I*c) + 1680*I*e^(10*I*d*x + 10*I*c) + 1050*I*e^(8*I*d* 
x + 8*I*c) + 560*I*e^(6*I*d*x + 6*I*c) + 210*I*e^(4*I*d*x + 4*I*c) + 48*I* 
e^(2*I*d*x + 2*I*c) + 5*I)*e^(-12*I*d*x - 12*I*c)/(a^4*d)
 
3.2.57.6 Sympy [A] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 326, normalized size of antiderivative = 1.46 \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\begin {cases} \frac {\left (- 202661983231672320 i a^{28} d^{7} e^{46 i c} e^{4 i d x} - 3242591731706757120 i a^{28} d^{7} e^{44 i c} e^{2 i d x} + 22698142121947299840 i a^{28} d^{7} e^{40 i c} e^{- 2 i d x} + 14186338826217062400 i a^{28} d^{7} e^{38 i c} e^{- 4 i d x} + 7566047373982433280 i a^{28} d^{7} e^{36 i c} e^{- 6 i d x} + 2837267765243412480 i a^{28} d^{7} e^{34 i c} e^{- 8 i d x} + 648518346341351424 i a^{28} d^{7} e^{32 i c} e^{- 10 i d x} + 67553994410557440 i a^{28} d^{7} e^{30 i c} e^{- 12 i d x}\right ) e^{- 42 i c}}{207525870829232455680 a^{32} d^{8}} & \text {for}\: a^{32} d^{8} e^{42 i c} \neq 0 \\x \left (\frac {\left (e^{16 i c} + 8 e^{14 i c} + 28 e^{12 i c} + 56 e^{10 i c} + 70 e^{8 i c} + 56 e^{6 i c} + 28 e^{4 i c} + 8 e^{2 i c} + 1\right ) e^{- 12 i c}}{256 a^{4}} - \frac {7}{64 a^{4}}\right ) & \text {otherwise} \end {cases} + \frac {7 x}{64 a^{4}} \]

input
integrate(cos(d*x+c)**4/(a+I*a*tan(d*x+c))**4,x)
 
output
Piecewise(((-202661983231672320*I*a**28*d**7*exp(46*I*c)*exp(4*I*d*x) - 32 
42591731706757120*I*a**28*d**7*exp(44*I*c)*exp(2*I*d*x) + 2269814212194729 
9840*I*a**28*d**7*exp(40*I*c)*exp(-2*I*d*x) + 14186338826217062400*I*a**28 
*d**7*exp(38*I*c)*exp(-4*I*d*x) + 7566047373982433280*I*a**28*d**7*exp(36* 
I*c)*exp(-6*I*d*x) + 2837267765243412480*I*a**28*d**7*exp(34*I*c)*exp(-8*I 
*d*x) + 648518346341351424*I*a**28*d**7*exp(32*I*c)*exp(-10*I*d*x) + 67553 
994410557440*I*a**28*d**7*exp(30*I*c)*exp(-12*I*d*x))*exp(-42*I*c)/(207525 
870829232455680*a**32*d**8), Ne(a**32*d**8*exp(42*I*c), 0)), (x*((exp(16*I 
*c) + 8*exp(14*I*c) + 28*exp(12*I*c) + 56*exp(10*I*c) + 70*exp(8*I*c) + 56 
*exp(6*I*c) + 28*exp(4*I*c) + 8*exp(2*I*c) + 1)*exp(-12*I*c)/(256*a**4) - 
7/(64*a**4)), True)) + 7*x/(64*a**4)
 
3.2.57.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\text {Exception raised: RuntimeError} \]

input
integrate(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")
 
output
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 
3.2.57.8 Giac [A] (verification not implemented)

Time = 0.81 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.64 \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {-\frac {420 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{4}} + \frac {420 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{4}} + \frac {30 \, {\left (21 i \, \tan \left (d x + c\right )^{2} - 49 \, \tan \left (d x + c\right ) - 29 i\right )}}{a^{4} {\left (\tan \left (d x + c\right ) + i\right )}^{2}} + \frac {-1029 i \, \tan \left (d x + c\right )^{6} - 6804 \, \tan \left (d x + c\right )^{5} + 19035 i \, \tan \left (d x + c\right )^{4} + 29080 \, \tan \left (d x + c\right )^{3} - 25995 i \, \tan \left (d x + c\right )^{2} - 13332 \, \tan \left (d x + c\right ) + 3317 i}{a^{4} {\left (\tan \left (d x + c\right ) - i\right )}^{6}}}{7680 \, d} \]

input
integrate(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")
 
output
-1/7680*(-420*I*log(tan(d*x + c) + I)/a^4 + 420*I*log(tan(d*x + c) - I)/a^ 
4 + 30*(21*I*tan(d*x + c)^2 - 49*tan(d*x + c) - 29*I)/(a^4*(tan(d*x + c) + 
 I)^2) + (-1029*I*tan(d*x + c)^6 - 6804*tan(d*x + c)^5 + 19035*I*tan(d*x + 
 c)^4 + 29080*tan(d*x + c)^3 - 25995*I*tan(d*x + c)^2 - 13332*tan(d*x + c) 
 + 3317*I)/(a^4*(tan(d*x + c) - I)^6))/d
 
3.2.57.9 Mupad [B] (verification not implemented)

Time = 6.07 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.88 \[ \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {7\,x}{64\,a^4}+\frac {\frac {\mathrm {tan}\left (c+d\,x\right )\,169{}\mathrm {i}}{960\,a^4}+\frac {4}{15\,a^4}+\frac {119\,{\mathrm {tan}\left (c+d\,x\right )}^2}{240\,a^4}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,889{}\mathrm {i}}{960\,a^4}-\frac {7\,{\mathrm {tan}\left (c+d\,x\right )}^4}{24\,a^4}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,91{}\mathrm {i}}{192\,a^4}-\frac {7\,{\mathrm {tan}\left (c+d\,x\right )}^6}{16\,a^4}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^7\,7{}\mathrm {i}}{64\,a^4}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^8\,1{}\mathrm {i}-4\,{\mathrm {tan}\left (c+d\,x\right )}^7+{\mathrm {tan}\left (c+d\,x\right )}^6\,4{}\mathrm {i}-4\,{\mathrm {tan}\left (c+d\,x\right )}^5+{\mathrm {tan}\left (c+d\,x\right )}^4\,10{}\mathrm {i}+4\,{\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,4{}\mathrm {i}+4\,\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )} \]

input
int(cos(c + d*x)^4/(a + a*tan(c + d*x)*1i)^4,x)
 
output
(7*x)/(64*a^4) + ((tan(c + d*x)*169i)/(960*a^4) + 4/(15*a^4) + (119*tan(c 
+ d*x)^2)/(240*a^4) + (tan(c + d*x)^3*889i)/(960*a^4) - (7*tan(c + d*x)^4) 
/(24*a^4) + (tan(c + d*x)^5*91i)/(192*a^4) - (7*tan(c + d*x)^6)/(16*a^4) - 
 (tan(c + d*x)^7*7i)/(64*a^4))/(d*(4*tan(c + d*x) + tan(c + d*x)^2*4i + 4* 
tan(c + d*x)^3 + tan(c + d*x)^4*10i - 4*tan(c + d*x)^5 + tan(c + d*x)^6*4i 
 - 4*tan(c + d*x)^7 - tan(c + d*x)^8*1i - 1i))